<?php
header("Content-type:text/html;charset=utf8");
$obj = new mysqli('localhost','root','admin888','c50');
if($obj->connect_errno)
{
	echo $obj->connect_error;
}
$obj->query("set names utf8");
// $obj->query("insert into news set title='mysqli'");
// 
// /$id = intval($id);

$title = addslashes($_GET['sname']);
// echo $title;exit;
$result = $obj->query("select * from stu where sname='$title'");
echo "select * from stu where sname='$title'";
$rows=array();
while($row =$result->fetch_object())
{
	$rows[]=$row;	
}
echo "<pre>";
print_r($rows);
// echo $row['sname'];
// $result->free();
// echo $row->sname;
